//
//  AMapManager.m
//  DingDongXiChe
//
//  Created by wtjr on 2017/11/16.
//  Copyright © 2017年 xieyingze. All rights reserved.
//

#import "AMapManager.h"

@implementation AMapManager

+ (instancetype)shareInstance {
    static dispatch_once_t once;
    static id _instance;
    dispatch_once(&once, ^{
        _instance = [[self alloc] init];
    });
    return  _instance;
}

- (void)setReGeocode:(AMapLocationReGeocode *)reGeocode {
    _formattedAddress = reGeocode.formattedAddress;
    _country = reGeocode.country;
    _province = reGeocode.province;
    _city = reGeocode.city;
    _district = reGeocode.district;
    _citycode = reGeocode.citycode;
    _adcode = reGeocode.adcode;
    _street = reGeocode.street;
    _number = reGeocode.number;
    _POIName = reGeocode.POIName;
    _AOIName = reGeocode.AOIName;
}

- (void)setCoordinate:(CLLocationCoordinate2D)coordinate {
    _coordinate = coordinate;
}

- (NSString *)city {
    return _city.length ? _city : @"";
}

@end
